// model/recipe_state.dart

import 'package:casdon/modules/recipe/ui/widgets/Recipe_card_item.dart';

class CategoryRecipeListState {
  final List<RecipeCardData> data;
  final int pageNum;
  final bool hasMore;
  final bool isLoadingMore;

  CategoryRecipeListState copyWith({
    List<RecipeCardData>? data,
    int? pageNum,
    bool? hasMore,
    bool? isLoadingMore,
  }) {
    return CategoryRecipeListState(
      data: data ?? this.data,
      pageNum: pageNum ?? this.pageNum,
      hasMore: hasMore ?? this.hasMore,
      isLoadingMore: isLoadingMore ?? this.isLoadingMore,
    );
  }

  factory CategoryRecipeListState.initial() => CategoryRecipeListState(
        data: [],
        pageNum: 0,
        hasMore: true,
        isLoadingMore: false,
      );

  CategoryRecipeListState({
    this.pageNum = 0,
    required this.data,
    this.hasMore = true,
    this.isLoadingMore = false,
  });
}
